package main

import (
	"demo/services"
	"google.golang.org/grpc"
	"net"
)

func main() {
	rpcService := grpc.NewServer()
	services.RegisterProdServiceServer(rpcService, new(services.ProdService)) // 商品服务
	services.RegisterOrderServicesServer(rpcService, new(services.OrderService)) // 订单服务

	lis, _ := net.Listen("tcp", "127.0.0.1:8081")

	rpcService.Serve(lis)
}
